<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">

<h:body>

 <ui:composition template="includetemplate.xhtml">
	   	<ui:define name="faceHeader">
	   		<ui:include src="headertemplate.xhtml"/> 
	   	</ui:define>
		
		<ui:define name="faceContent">
			<table width="100%" class="mainTableStyle" >
				<tr>
					<td style="width:100%"  align="center">
							<table width="400" cellspacing="0px" cellpadding="2" class="TableStyle_1" style="background-color: #F0F0F0">
								<tr>
									<td colspan="2" align="left" style="background-color: #104E8B;color:white;font-weight:bold;height: 20px;">
											Zimmer suchen
									</td>
								</tr>
								<tr>
									<td class="td_font_bold" style="width:100px">Zimmer Name: *</td>
									<td align="left">
										<h:inputText id="txtZimmerNameSuche" value="#{zimmerManagement.zimmerNameSearch}" required="true"></h:inputText>
										
										
										<h:commandButton value="suchen" action="#{zimmerManagement.searchZimmerByName}" styleClass="buttonStyle_2"></h:commandButton>&nbsp;
										
									</td>
								</tr>
								
							</table>
							
							
							<br /><br /><br /><br />
							
							<h:dataTable width="800" binding="#{zimmerManagement.dtZimmern}" 
										 rendered="#{zimmerManagement.iszimmerFound}" 
										 headerClass="td_header_1"  
										 value="#{zimmerManagement.zimmern}" 
										 var="zimmer" 
										 cellspacing="0" 
										 cellpadding="2" 
										 class="TableStyle_1" 
										 rowClasses="dt_text">
								<h:column>
					                <f:facet name="header"><h:outputText  value="Id" /></f:facet>
					                <h:outputText value="#{zimmer.id}" />
					            </h:column>
					            <h:column>
					                <f:facet name="header"><h:outputText  value="Name" /></f:facet>
					                <h:outputText value="#{zimmer.name}" />
					            </h:column>
					            <h:column>
					                <f:facet name="header"><h:outputText  value="Max. Belegzahl" /></f:facet>
					                <h:outputText value="#{zimmer.maxBelegZahl}" />
					            </h:column>
				                <h:column>
					            	<f:facet name="header"><h:outputText value="bearbeiten"/></f:facet>
					                <h:commandLink value="Daten bearbeiten" action="#{zimmerManagement.showZimmerDetails}" styleClass="dt_text"  />
					            </h:column>  
				            </h:dataTable>
					</td>
				</tr>
			</table>
		</ui:define>
	
	</ui:composition>
</h:body>
</html>